#include <stdio.h>
int Recursion(int num,int* res){
    if(num == 1 || num == 2)
        return num;
    if(res[num-1] != 0)
        return res[num-1];
    return res[num-1] = Recursion(num-1,res)+Recursion(num-2,res);
}
int main(){
    int num = 0;
    int ans = 0;
    int res[30] = {1,2};
    scanf("%d",&num);
    ans = Recursion(num,res);
    printf("%d",ans);
    return 0;
}
